package com.hy.mydesktop.client.mvc.core.event.manager;

import java_cup.internal_error;

import com.extjs.gxt.ui.client.event.EventType;
import com.extjs.gxt.ui.client.mvc.AppEvent;
import com.hy.mydesktop.client.component.event.AppEvents;
import com.hy.mydesktop.client.mvc.base.BasePresenter;
import com.hy.mydesktop.client.mvc.base.Presenter;
import com.hy.mydesktop.shared.persistence.domain.gxt.constant.ComponentMetaDataConstants;
import com.hy.mydesktop.shared.util.log.MyLoggerUtil;

public class PresenterHandleUtil {

	public static void printPresenterInfoForEventHandle(Presenter presenter,AppEvent appEvent) {
		 int lastIndexOfPoint= MyLoggerUtil.getlastIndexOfPoint(presenter.getClass().getName());

		 EventType eventType =null;
		 String eventTypeString=null;
		 int eventCode=appEvent.getType().getEventCode();
		 if (AppEvents.LOAD_DATA_EVENT.getEventCode()==eventCode) {
			 eventTypeString="AppEvents.LOAD_DATA_EVENT";
		 }else {
			throw new RuntimeException("xxxxxxxxxxxxxx");
		 }
		
		MyLoggerUtil.printInfo(PresenterHandleUtil.class,
				 "【"+
				 presenter.getClass().getName().substring(1+lastIndexOfPoint)+
				 "】"+
				 "处理，【"+
				 eventTypeString+
				 "事件】;");
		
	}

}
